import useLoginModel from "../../model/useLoginModel"

export interface SearchParamsProps {
    entryStatus: string
}

/**
* 初始化列表请求参数
* @param props 
* @returns 
*/
export const initSearchParams = (props: SearchParamsProps) => {
    const userInfo = useLoginModel.data
    return {
        custManagerId: userInfo?.user?.username,
        entryStatus: props.entryStatus,
        pageNum: 1,
        pageSize: 20,
        orderByType: "intention"
    }
}

/**
* 初始化跳转进件详情参数
* @param item 
* @returns 
*/
export const initDealEntryParams = (item: any) => {
    let isAlterTenant = "N";
    let isAlterPlanFlag = "N";
    const params = {
        entryNo: item.entryNo,
        type: 'deal',
        intentionNo: item.intentionNo,
        isAlterTenant: isAlterTenant,
        isAlterPlan: isAlterPlanFlag,
        fundingParty: item.fundingParty,
        isPreSecondSign: item.secondSigningFlag
    }
    return params
}